<template>
  <header class="header">
      <h1>todos</h1>
      <input class="new-todo" placeholder="请输入任务名称" autofocus v-model.trim="content" @keyup.enter="contentPut"/>
    </header>
</template>
 
<script>
export default {
  name:'TodoListHearder',
  components: {},
  props: {},
  data() {
    return {
      content:''
    };
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    contentPut(){
      this.content&&this.$emit("contentPut",this.content)
      this.content=''
    }
  }
};
</script>

<style scoped>
     
</style>